
<%= paginator.render do -%>
  <nav class="pagination pc-pagination">
    <%= prev_page_tag unless current_page.first? %>
    <% gap_count = 0 %>
    <% each_page do |page| -%>
      <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
        <%= page_tag page %>
      <% elsif !page.was_truncated? && gap_count == 0 -%>
        <% gap_count += 1 %>
        <% unless (current_page <=5 and total_pages >= 7) %>
          <%= gap_tag %>
        <% end %>
      <% end -%>
    <% end -%>
    <%= next_page_tag unless current_page.last? %>
  </nav>
<% end -%>
